using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Renderer.Utils
{
    /// <summary>
    /// This class is used when bad error occures - it should be logged with "Error" status 
    /// and shown to the user as MessageBox    
    /// </summary>
    class ExceptionHandler
    {
        public static void Handle(Exception e)
        {
            Handle(e.ToString());
        }

        public static void Handle(string msg, Exception inner)
        {
            Handle(msg + " " + inner);
        }  
        
        public static void Handle(string msg)
        {
            Logger.Log("Error: " + msg);
            MessageBox.Show(msg, "Error");
        }             
    }
}
